# $Id$
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: John Proctor <jproctor@prium.net>

pkgname=ctags
pkgver=5.8
pkgrel=6
pkgdesc="Generates an index file of language objects found in source files"
arch=('x86_64')
license=('GPL')
depends=('glibc')
url="http://ctags.sourceforge.net/"
source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz"
        "CVE-2014-7204.patch")
sha512sums=('981912cd335978cde22864e977947fc75326572fb29518e559cc4a8ac1edc84b3604165218a666e36353f17da4f89f8e967acdb88696f816748eb946d79eaa15'
            '7593aa9ca8857b09127a842752d214764734215b42b58c8a44e2a320b21b5a4923dd05a3d14a9053e570f07297d77b3d2fa8f5d41c500e9aadf993413a66be76')

prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}

  patch -Np1 <../CVE-2014-7204.patch
}

build() {
  cd ${srcdir}/${pkgname}-${pkgver}

  ./configure --prefix=/usr \
              --disable-external-sort
  make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}

  make prefix=${pkgdir}/usr install
}
